﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkStation.UI.Controls
{
    public class LineMotion : MotionShape
    {
        public PointF StartPoint;
        public PointF EndPoint;
        public DashStyle Style;
        public bool EnableEndCap { get; set; }
        public LineMotion()
        {

        }
        public LineMotion(string description)
            : base(description)
        {

        }
        public override void Draw(Graphics g)
        {
            Pen p = new Pen(PaintColor, LineWidth);
            p.DashStyle = Style;
            if (EnableEndCap)
            {
                AdjustableArrowCap lineCap = new AdjustableArrowCap(5, 5, false);
                p.CustomEndCap = lineCap;
            }
            g.DrawLine(p, StartPoint.X, StartPoint.Y, EndPoint.X, EndPoint.Y);
        }
    }
}
